package com.itheima.api.client;

import com.itheima.api.client.fallback.WebClientFallbackFactory;
import com.itheima.api.entity.WebUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "blog-auth",
        configuration = FeignClientConfig.class,
        fallbackFactory = WebClientFallbackFactory.class)
public interface WebUserClient {
    @GetMapping("/web-user/userList")
    List<WebUser> findUserList(@RequestParam("userIds") Iterable<Integer> userIds);
    @GetMapping("/web-user/nickName")
    List<Integer> findUserIdListByNickName(@RequestParam("nickName") String nickName);
}
